if(KMPKG_TARGET_IS_WINDOWS AND NOT KMPKG_TARGET_IS_MINGW)
    kmpkg_from_gitee(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO kumo-hub/workflow
        REF "v${VERSION}-win"
        SHA512 0a04d7f32f9320a932488de45aa6584fe24ff2cea473e1aeb5739548ea09a281c833f8348412fb037568c0a70a6c9e2874f3c3fbff19996eaded9582bbdec0e8
        HEAD_REF windows
    )
else()
    kmpkg_from_gitee(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO kumo-hub/workflow
        REF "v${VERSION}"
        SHA512 71627bdc518196945f4a48e9a36d1ed95d243e3dd51929f90341414d725bf76c7e6903be1c160cc04c04e7c522b79e44cedcc3ca28a4b59e4e734506553a73a7
        HEAD_REF master
    )
endif()

if(KMPKG_CRT_LINKAGE STREQUAL "static")
    set(CONFIGURE_OPTIONS "-DWORKFLOW_BUILD_STATIC_RUNTIME=ON")
else()
    set(CONFIGURE_OPTIONS "-DWORKFLOW_BUILD_STATIC_RUNTIME=OFF")
endif()

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    DISABLE_PARALLEL_CONFIGURE
    OPTIONS ${CONFIGURE_OPTIONS}
)
kmpkg_cmake_install()
kmpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
kmpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
